<?php

require_once("common.inc.php");

if (empty($_REQUEST["text"])) {

?>
<html><head></head><body>

<a href="?text=true">Text only versie</a><ul>
<?php

} else {
	header("Content-Type: text/plain");
}

$bll = BLL::getInstance();
foreach ($bll->getAll("Question") as $question) {
	$url = generateQuestionURL($question);
	if (empty($_REQUEST["text"])) {
		printf("<li><a href=\"%s\">Vraag %s</a>: %s </li>\n", $url, $question->id, $question->questionText);
	} else {
		printf("%s\n", $url);
	}
}

if (empty($_REQUEST["text"])) {

?>
</ul></body><html>
<?php

}
